package org.example.mapper;

import org.example.dto.BabyDTO;
import org.example.dto.CarDTO;
import org.example.entity.Baby;
import org.example.entity.Car;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Named;

import java.time.LocalDateTime;

/**
 * @author yangdc
 * @date 2025/4/23
 */
@Mapper
public interface BabyMapper {

    BabyDTO babyToBabyDTO(Baby baby);

    // ----------------4、命名转换----------------
    @Named("TIME_TO_DATE_STRING")
    default String timeToDateString(LocalDateTime time) {
        // 格式化为日期字符串
        return "";
    }
    @Named("TIME_TO_TIME_STRING")
    default String timeToTimeString(LocalDateTime time) {
        // 格式化为时间字符串
        return "";
    }
}
